package net.lainiao.morethread.Chapter1.demo5;

/**
 * Created by Administrator on 2017/2/27.
 */
public class ExceptionHandler implements Thread.UncaughtExceptionHandler {
    @Override
    public void uncaughtException(Thread t, Throwable e) {
        System.out.println("An Exception has been captured");
        System.out.println("Thread:"+t.getId());
        System.out.println("Excetption:"+e.getClass().getName()+" "+e.getMessage());
        System.out.println("Stack Trarce:");
        e.printStackTrace();
        System.out.println("Thread status:"+t.getState());
    }
}
